package com.lam.common.validate.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.validation.groups.Default;

import com.lam.common.components.dict.annotation.Dict;

/**
 * 字典数据校验
 * 支持在Getter方法和Field上面，优先取Field上面的注解
 * 
 */
@Target({ ElementType.METHOD, ElementType.FIELD })
@Retention(RetentionPolicy.RUNTIME)
public @interface DictValid {
	
	String message() default "无效的字段值";

	Class<?>[] groups() default { Default.class };
	
	Dict dictDesc() default @Dict(dictCode = "");
	
}
